/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * EmpleadoMod.java
 *
 * Created on 05-jul-2011, 21:43:27
 */
package labhibernate;

/**
 *
 * @author Fam
 */
public class EmpleadoMod extends javax.swing.JFrame {

    /** Creates new form EmpleadoMod */
    public EmpleadoMod() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel3 = new javax.swing.JPanel();
        jdire2 = new javax.swing.JTextField();
        jFa2 = new javax.swing.JComboBox();
        japellidos2 = new javax.swing.JTextField();
        jsc2 = new javax.swing.JComboBox();
        carne2 = new javax.swing.JTextField();
        nombres2 = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        dob2 = new org.freixas.jcalendar.JCalendarCombo();
        bCancel2 = new javax.swing.JButton();
        bAcepta2 = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jLabel25 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel3.setBackground(new java.awt.Color(191, 228, 246));

        jdire2.setFont(new java.awt.Font("Maiandra GD", 0, 12)); // NOI18N

        jFa2.setFont(new java.awt.Font("Maiandra GD", 0, 12)); // NOI18N
        jFa2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Licenciado", "Ingeniero", "Secretaria", "Contador", "Auditor" }));

        japellidos2.setFont(new java.awt.Font("Maiandra GD", 0, 12));

        jsc2.setFont(new java.awt.Font("Maiandra GD", 0, 12)); // NOI18N
        jsc2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Soltero", "Casado", " ", " " }));

        carne2.setFont(new java.awt.Font("Maiandra GD", 0, 12));

        nombres2.setFont(new java.awt.Font("Maiandra GD", 0, 12));
        nombres2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nombres2ActionPerformed(evt);
            }
        });

        jLabel18.setFont(new java.awt.Font("Maiandra GD", 0, 12));
        jLabel18.setText("No. Carné");

        jLabel19.setFont(new java.awt.Font("Maiandra GD", 0, 12)); // NOI18N
        jLabel19.setText("Fecha Nacimiento");

        jLabel20.setFont(new java.awt.Font("Maiandra GD", 0, 12));
        jLabel20.setText("Formación Academica");

        jLabel21.setFont(new java.awt.Font("Maiandra GD", 0, 12));
        jLabel21.setText("Estado Civil");

        jLabel22.setFont(new java.awt.Font("Maiandra GD", 0, 12));
        jLabel22.setText("Apellidos");

        jLabel23.setFont(new java.awt.Font("Maiandra GD", 0, 12));
        jLabel23.setText("Nombres");

        jLabel24.setFont(new java.awt.Font("Maiandra GD", 0, 12)); // NOI18N
        jLabel24.setText("Dirección");

        dob2.setDate(new java.util.Date(1309919344000L));
        dob2.setDayFont(new java.awt.Font("Maiandra GD", 0, 10)); // NOI18N
        dob2.setDayOfWeekFont(new java.awt.Font("Maiandra GD", 0, 10)); // NOI18N
        dob2.setFont(new java.awt.Font("Maiandra GD", 0, 12)); // NOI18N

        bCancel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/4158.png"))); // NOI18N
        bCancel2.setText("CANCELAR");

        bAcepta2.setBackground(new java.awt.Color(255, 255, 204));
        bAcepta2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/4149.png"))); // NOI18N
        bAcepta2.setText("ACEPTAR");
        bAcepta2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bAcepta2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                                    .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jsc2, 0, 346, Short.MAX_VALUE)
                                        .addComponent(nombres2, javax.swing.GroupLayout.DEFAULT_SIZE, 346, Short.MAX_VALUE)
                                        .addComponent(jFa2, 0, 346, Short.MAX_VALUE)
                                        .addComponent(japellidos2, javax.swing.GroupLayout.DEFAULT_SIZE, 346, Short.MAX_VALUE)
                                        .addComponent(carne2, javax.swing.GroupLayout.DEFAULT_SIZE, 346, Short.MAX_VALUE)))
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(jLabel22, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLabel23, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 87, Short.MAX_VALUE)
                                    .addComponent(jLabel21, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel20, javax.swing.GroupLayout.Alignment.LEADING)))
                            .addContainerGap())
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel24)
                                .addComponent(jLabel19))
                            .addGap(25, 25, 25)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(dob2, javax.swing.GroupLayout.DEFAULT_SIZE, 346, Short.MAX_VALUE)
                                .addComponent(jdire2, javax.swing.GroupLayout.DEFAULT_SIZE, 346, Short.MAX_VALUE))
                            .addContainerGap()))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                        .addComponent(bCancel2)
                        .addGap(18, 18, 18)
                        .addComponent(bAcepta2)
                        .addGap(36, 36, 36))))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel18)
                    .addComponent(carne2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel23)
                    .addComponent(nombres2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(japellidos2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(jsc2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel20)
                    .addComponent(jFa2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jdire2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel24))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(dob2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(27, 27, 27)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(bCancel2)
                    .addComponent(bAcepta2, javax.swing.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE))
                .addContainerGap(55, Short.MAX_VALUE))
        );

        jPanel4.setBackground(new java.awt.Color(170, 224, 251));

        jLabel25.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/empleadof5.jpg"))); // NOI18N
        jLabel25.setText("jLabel25");

        jLabel1.setFont(new java.awt.Font("Maiandra GD", 1, 18)); // NOI18N
        jLabel1.setText("MODIFICAR EMPLEADO");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(53, 53, 53)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(69, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel25))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(44, 44, 44)
                        .addComponent(jLabel1)))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void nombres2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nombres2ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_nombres2ActionPerformed

    private void bAcepta2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bAcepta2ActionPerformed
        CURD employ = new CURD();
        
        employ.InsertEmploy(Integer.parseInt(carne.getText()),nombres.getText(),
                japellidos.getText() , dob.getDate(), jdire.getText(),
                String.valueOf(jsc.getSelectedItem()) , String.valueOf(jFa.getSelectedItem()));
        
        
    }//GEN-LAST:event_bAcepta2ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new EmpleadoMod().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton bAcepta;
    private javax.swing.JButton bAcepta1;
    private javax.swing.JButton bAcepta2;
    private javax.swing.JButton bCancel;
    private javax.swing.JButton bCancel1;
    private javax.swing.JButton bCancel2;
    private javax.swing.JTextField carne;
    private javax.swing.JTextField carne1;
    private javax.swing.JTextField carne2;
    private org.freixas.jcalendar.JCalendarCombo dob;
    private org.freixas.jcalendar.JCalendarCombo dob1;
    private org.freixas.jcalendar.JCalendarCombo dob2;
    private javax.swing.JComboBox jFa;
    private javax.swing.JComboBox jFa1;
    private javax.swing.JComboBox jFa2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JComboBox jPuesto;
    private javax.swing.JComboBox jPuesto1;
    private javax.swing.JTextField japellidos;
    private javax.swing.JTextField japellidos1;
    private javax.swing.JTextField japellidos2;
    private javax.swing.JTextField jdire;
    private javax.swing.JTextField jdire1;
    private javax.swing.JTextField jdire2;
    private javax.swing.JComboBox jsc;
    private javax.swing.JComboBox jsc1;
    private javax.swing.JComboBox jsc2;
    private javax.swing.JTextField nombres;
    private javax.swing.JTextField nombres1;
    private javax.swing.JTextField nombres2;
    // End of variables declaration//GEN-END:variables
}
